What is strict-uri-encode?
The strict-uri-encode npm package is designed for percent-encoding a string as per RFC 3986. It is particularly useful for encoding URI components more strictly than what is provided by native JavaScript functions like encodeURIComponent. This can be essential in situations where you need to ensure that characters are encoded in a way that is compliant with certain web standards or APIs that expect strictly encoded URIs.
Percent-encoding URI components
This feature allows you to percent-encode a URI component more strictly than encodeURIComponent. For example, characters such as '!', '*', ''', '(', and ')' will be encoded, which are not encoded by the encodeURIComponent function. This is useful when you need to encode these characters in a URI component to ensure it adheres to certain standards or API expectations.
"strict-uri-encode('! * '()')"